const store = require("./store")

console.log(store.getState(), "修改前")

// store.getState().name = 'kobe'; // 是这么修改吗？ NO

// 一定要通过派发action去修改
let yourAction = { type: "changeNameAction", name: "kobe" }
store.dispatch(yourAction)

console.log(store.getState(), "修改后1")

yourAction = { type: "changeNameAction", name: "James" }
store.dispatch(yourAction)

console.log(store.getState(), "修改后2")

let testAction = { type: "changeAgeAction", age: -1 }
store.dispatch(testAction)

console.log(store.getState(), "修改age后")
